package com.SmartCare.service.impl.medicine;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.SmartCare.common.Result;
import com.SmartCare.mapper.medicine.MedicationFrequencyMapper;
import com.SmartCare.pojo.medicine.MedicationFrequency;
import com.SmartCare.service.medicine.MedicationFrequencyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MedicationFrequencyServiceImpl extends ServiceImpl<MedicationFrequencyMapper, MedicationFrequency> implements MedicationFrequencyService {
    @Autowired
    private MedicationFrequencyMapper medicationFrequencyMapper;

    /**
     * 服药频率推荐信息查询
     *
     * @return
     */
    @Override
    public Result frequencyQuery() {
        List<MedicationFrequency> list = medicationFrequencyMapper.selectList(null);
        return Result.success(list);
    }

    @Override
    public Result getAll() {
        return Result.success(list());
    }
}
